package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("book")
@ApiModel("书籍实体")
public class Book implements Serializable {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty(value = "创建人", required = true)
    private String createdBy;

    @ApiModelProperty(value = "创建时间", required = true)
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "更新人", required = true)
    private String updatedBy;

    @ApiModelProperty(value = "更新时间", required = true)
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "删除标识 0：未删除1：已删除 默认：0", required = true)
    private String delFlag;

    @ApiModelProperty(value = "乐观锁", required = true)
    private Integer revision;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "书籍名称", required = true)
    private String name;

    @ApiModelProperty(value = "出版社", required = true)
    private String publisher;

    @ApiModelProperty(value = "出版日期", required = true)
    private LocalDate publishDate;

    @ApiModelProperty(value = "作者", required = true)
    private String author;
} 